// 获取用商品
import axios from "../../utils/axios";
// import Qs from "qs";

export function getList(query) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/getCommodityMgrAudit",
        method: "get",
        params: query
    });
}
export function commodityToExamine(query) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/commodityToExamine",
        method: "post",
        params: query
    });
}

//获得仓库
export function getBusWarehouseList(query) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/getBusWarehouseList",
        method: "get",
        params: query
    });
}
// 删除
export function delBusCommodity(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/delBusCommodity",
        method: "post",
        data: data
    });
}

// 更新状态
export function updateBusCommodity(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/updateBusCommodity",
        method: "post",
        data: data
    });
}
// 添加
export function addBusCommodity(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/insertBusCommodity",
        method: "post",
        data: data
    });
}

// 添加参数
export function insertCommodityInventory(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/insertCommodityInventory",
        method: "post",
        data: data
    });
}
/*------------评论----------*/
//列表
export function getComment(query) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/getComment",
        method: "get",
        params: query
    });
}
//h获得评价参数
export function getCommentParameters(query) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/getCommentParameters",
        method: "post",
        params: query
    });
}

// 删除
export function delComment(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/delComment",
        method: "post",
        data: data
    });
}

// 更新状态
export function updateBusCommodityComment(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/updateBusCommodityComment",
        method: "post",
        data: data
    });
}
// 添加
export function insertComment(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/insertComment",
        method: "post",
        data: data
    });
}
// 添加商城认证资质模板
export function addOrEditCheckTemplate(data) {
    return axios({
        // headers: {
        //     "Content-Type": " application/json;charset=UTF-8"
        // },
        // transformRequest: [
        //     function(data) {
        //         //在请求之前对data传参进行格式转换
        //         data = Qs.stringify(data);
        //         return data;
        //     }
        // ],
        url: "goldendays-goods/entityBusiness/addOrEditCheckTemplate",
        method: "post",
        data: data
    });
}
// /entityBusiness/getTemplateList 总后台商城商家管理--查询商城认证配置
export function getTemplateList(data) {
    return axios({
        // headers: {
        //     "Content-Type": " application/json;charset=UTF-8"
        // },
        // transformRequest: [
        //     function(data) {
        //         //在请求之前对data传参进行格式转换
        //         data = Qs.stringify(data);
        //         return data;
        //     }
        // ],
        url: "goldendays-goods/entityBusiness/getTemplateList",
        method: "post",
        data: data
    });
}
//获取商品认证配置模板
export function getGoodsTemplateList(data) {
    return axios({
        url: "goldendays-goods/entityBusiness/getGoodsTemplateList",
        method: "post",
        data: data
    });
}
//保存商品认证配置模板
export function addOrEditCheckGoodsTemplate(data) {
    return axios({
        url: "goldendays-goods/entityBusiness/addOrEditCheckGoodsTemplate",
        method: "post",
        data: data
    });
}

export function getGoodsCertificationInfo(data) {
    return axios({
        url: "/certification/getGoodsCertificationInfo",
        method: "post",
        data: data
    });
}
